﻿using ToolKitIESiteList.Library;
using System;
using System.Windows.Forms;

namespace ToolKitManagerIESiteList.UserControls
{
    public partial class FileSiteDiscovery : UserControl
    {
        public event EventHandler<EventArgs> ItemRemoved;
 
        protected virtual void OnItemRemoved(EventArgs e)
        {
            ItemRemoved?.Invoke(this, e);
        }

        public string FileName { get { return lblName.Text; } }

        public FileSiteDiscovery()
        {
            InitializeComponent();
        }

        public FileSiteDiscovery(string fileName) : this()
        {
            lblName.Text = fileName;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            OnItemRemoved(e);
        }
    }
}
